<!--
  Generated template for the AddressManagementPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>收 货 地 址 管 理</ion-title>
    <ion-buttons end>
      <button ion-button icon-only (click)="addAddress()">
        <ion-icon name="md-add"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>


<ion-content class="bgs">
  <ul class="address_list">
    <li [class.selected]="item.is_default == 1" *ngFor="let item of addressList">
      <p class="header" (click)="setDefault(item)">
        <span class="name">{{item.consigner}}</span>
        <span class="tel">{{item.mobile}}</span>
      </p>
      <p class="body" (click)="setDefault(item)">
        <span [innerHtml]="item.address_info"></span>
        <span> {{item.address}}</span>
      </p>
      <div class="footer">
        <span class="auto" (click)="setDefault(item)">
          设为默认收货地址
        </span>
        <p>
          <span (click)="editAddress(item)">编辑</span>
          <span (click)="deleteAddress(item.id)">删除</span>
        </p>
      </div>
    </li>

  </ul>
</ion-content>
